<template>
	<view>
		<button type="default" @click="openDatetimePicker">open picker</button>
		<buuug7-simple-datetime-picker ref="myPicker" @submit="handleSubmit" :start-year="2000" :end-year="2099"
			:time-init="1688860800000" :time-hide="[true, true, true, true, true, false]"
			:time-label="['年', '月', '日', '时', '分', '秒']" />
		<view class="" @click=" tzdahb">
			跳转到爱好标签
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				birthday: "",
			}
		},
		methods: {
			// 跳转到爱好标签
			tzdahb() {
				uni.navigateTo({
					url: '/pages/login/xuanzeahbq'
				})
			},
			// 打开picker
			openDatetimePicker() {
				this.$refs.myPicker.show();
			},

			// 关闭picker
			closeDatetimePicker() {
				this.$refs.myPicker.hide();
			},

			handleSubmit(e) {
				// console.log(e);
				// {year: "2023", month: "07", day: "11", hour: "15", minute: "21", seconds: '55'}
				this.birthday = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}:${seconds}`;
			},
		}
	}
</script>

<style>

</style>